package com.sokal.easycare.modules.order.entity.rec;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 订单状态变迁通知记录Entity
 * @author nibo
 * @version 2017-03-17
 */
public class OmOrderStateRec extends DataEntity<OmOrderStateRec> {
	
	private static final long serialVersionUID = 1L;
	private String orderCode;		// 系统自由编码定义，保留
	private String notifyMsg;		// notify_msg
	private Date stateDate;		// state_date
	private String state;		// state
	private String userID;		// state
	
	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public OmOrderStateRec() {
		super();
	}

	public OmOrderStateRec(String id){
		super(id);
	}

	@Length(min=1, max=30, message="系统自由编码定义，保留长度必须介于 1 和 30 之间")
	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}
	
	@Length(min=0, max=500, message="notify_msg长度必须介于 0 和 500 之间")
	public String getNotifyMsg() {
		return notifyMsg;
	}

	public void setNotifyMsg(String notifyMsg) {
		this.notifyMsg = notifyMsg;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="state_date不能为空")
	public Date getStateDate() {
		return stateDate;
	}

	public void setStateDate(Date stateDate) {
		this.stateDate = stateDate;
	}
	
	@Length(min=1, max=3, message="state长度必须介于 1 和 3 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
}